{% extends "base_en.html" %}
{% block content %}
<script type="text/javascript" src="/static/javascripts/xms_en.js"></script>
<div>
    <ins>{%if show_admins %}Admin{%else%}User{%endif%} List: {{groupusers.count}} items!
    <br/></ins>
    {% include 'pager_en.html' %}
    <form method="post" action="/groupusers/" >
    <table class="datalist" cellpadding="2" cellspacing="0">
    <tr>
      <th style="width:150px;"><span>Email</span></th>
      <th style="width:150px;"><span>Name</span></th>
      <th><span>Intro</span></th>
      {%if isAdmin%}
      <th style="width:150px;">Action</th>
      {%endif%}
    </tr>
    {% for user in groupusers.list %}
    <tr class={%if forloop.counter0|divisibleby:2 %}"alternation"{%else%}"seperation"{%endif%}>
      <td>{{user.User.email|escape }}</td>
      <td>{{user.NickName|escape}}</td>
      <td><span>{{user.Intro|escape}}</span></td>
      {%if isAdmin%}
      <td>
      {% if show_admins %}
          {%if isOwner%}
          <a href="/groupaction/admin2user/{{user.NickName}}">Degrade to User</a>
          {%else%}
          {%endif%}
      {%else%}
	      {% if show_users %}
	      {%if isAdmin%}
	      <a href="/groupaction/user2admin/{{user.NickName}}">Upgrade to Admin</a> | 
	      <a href="/groupaction/deluser/{{user.NickName}}">Delete</a>
	      {%endif%}
	      {%endif%}
      {%endif%}
      </td>
      {%endif%}
    </tr>
    {% endfor %}
    </table>
    </form>
</div>
{% endblock %}
